import { translationMap } from "@/api/interface/sysManage/translation";
import { PORT1 } from "@/api/config/servicePort";
import http from "@/api";


//翻译菜单列表头部
export const getAllTranslationHeadApi = (params: FormData) => {
    return http.get(PORT1+`/sys/message/field`, params, { cancel: false,loading: false  });
};
//翻译菜单列表
export const getAllTranslationListApi = (params: FormData) => {
    return http.post<translationMap[]>(PORT1+`/sys/message/list?get_auth=1&auth_name=translationManageTest`, params,  { cancel: false,loading: false  });
};
  
//新增翻译
export const saveCreateTranslation = (params: FormData) => {
    return http.post<translationMap[]>(PORT1+`/sys/message/create`, params, { cancel: false });
};
//修改翻译
export const saveEditTranslation = (params: FormData) => {
    return http.post<translationMap[]>(PORT1+`/sys/message/edit`, params, { cancel: false });
};

//删除
export const delTranslationOne = (params: FormData) => {
    return http.get(PORT1+`/sys/message/delete`, params, { cancel: false });
};

//同步翻译
// /
export const publishJs = (params: FormData) => {
    return http.get(PORT1+`/sys/message/publish-js`, params, { cancel: false });
};

  //批量添加翻译
export const saveCreateTranslationMoreApi = (params: FormData) => {
    return http.post<translationMap[]>(PORT1+`/sys/message/batch-edit`, params, { cancel: false });
};

//批量翻译
export const saveCreateTranslationMoreUpdateApi = (params: FormData) => {
    return http.post<translationMap[]>(PORT1+`/sys/message/batch-update `, params, { cancel: false });
};
   
